Sensor continuous path identification algorithm - Database & Sql Blog Articles

Single chip microcomputer STM32L151CCU6
Photocoupler

For the infrared photoelectric sensor, corresponding to different road conditions (mainly black and white), the receiving tube receives the ground diffuse reflection infrared light and its voltage at both ends will be different, that is, the sensor receiving tube is facing the white road surface, then its voltage Higher, if the line is marked with a black path, the voltage is lower. Based on this principle, a more common path discrete recognition algorithm can be proposed: the receiving tube voltage is read into the single-chip microcomputer through the ordinary I/O port, and the high-low level logic of the port input is used to judge whether the sensor is above the path marking line, and then screening. All the sensors above the marking line can roughly determine the position of the body relative to the road at this time and determine the path information.

This kind of discrete algorithm is simple and easy, and the requirements on hardware and algorithm are relatively low. In the case of a large number of sensors, high recognition accuracy can be achieved. However, one of its fatal flaws is that the path information is only based on the discrete values ​​of the spaced-apart sensors. It does not provide effective distance information for the "blind zone" between two adjacent sensors, so in the smart car race where the number of sensors is limited. Its path recognition accuracy is greatly limited by the number of sensors and their spacing.

Even if the number of sensors is not limited, the path recognition accuracy is high enough, and the discrete path recognition algorithm still has inherent defects that are difficult to overcome. Since the path information obtained by the discrete algorithm is a discrete value, if it is directly applied to the steering and vehicle speed control strategy, it will inevitably lead to a step change of steering and vehicle speed regulation, which will have the following adverse effects on the performance of the car: First, steering And the speed control is rigid, it is not sensitive to the path change, and it is easy to produce overshoot and oscillation. Second, the steering output angle is step-delay response with respect to the path. For the high speed performance, the high speed and short decision period control strategy In other words, it is very likely that the control fails due to the lack of response from the steering gear.

In order to solve the above problems, on the one hand, we can start from the path identification algorithm, find a path recognition algorithm with high recognition accuracy, no limit on the number of sensors, and continuous identification information. On the other hand, we can start from the control algorithm to find information based on discrete path. Continuous control algorithm. Focusing on the first idea, this paper proposes a method of continuation of data collected by finite interval arrangement sensors to achieve continuous path identification.

Photoelectric sensor characteristics

This continuous method is mainly based on an in-depth study of the characteristics of photoelectric sensors.

In fact, the characteristics of the infrared photoelectric sensor are not as simple as the above (white area high voltage, black line low voltage), and the voltage level has a quantitative relationship with the horizontal distance of the sensor from the black path mark line: the closer the black line is, the voltage The lower the distance from the black line, the higher the voltage (the specific correspondence is related to the type of photocell and the height from the ground).

Therefore, as long as the sensor voltage-offset distance characteristic relationship is grasped, the distance between each sensor and the black mark line can be determined according to the magnitude of the sensor voltage (instead of merely judging whether the sensor is online or not), thereby obtaining the body relative path mark. The position of the line gives the continuously distributed path information.

Continuous path recognition algorithm

Sensor characterization

The measurement of the sensor voltage-offset distance curve is the basis for continuous path identification and needs to be done in advance during the software debugging phase. The following takes a set of actually designed sensors as an example to illustrate the process of curve measurement.

Pre-calibration

Considering the difference in track and the effect of sensor temperature drift on the overall variation of the sensor voltage, pre-calibration of the track is required before each race, so as to provide accurate normalization for the normalization process in the path identification part of the algorithm below. parameter.

During the calibration process, the car is parked, but the sensor and its voltage A/D conversion channel are still working, and the microcontroller continuously records the read voltage value. Move the car on the track so that all sensors can sweep over the white road and the black track markings so that the microcontroller can record the maximum voltage (white voltage) and minimum value of the road sensor on the track (black) Zone voltage) provides basic parameters for normalization in the algorithm.

Path identification

Path identification (ie, path information acquisition) is the core content of the control algorithm, and each step is completed within a single decision control cycle. First, in each decision control cycle, the sensor voltage is converted to digital by A/D conversion and read into the microcontroller. Then, the obtained sensor voltage is normalized by using the maximum and minimum values ​​of the sensor voltage obtained during the calibration process. Next, you need to identify valid sensors that can be used to determine path information. Then, you need to call the sensor characteristic curve parameters to calculate the path information. Finally, in order to improve the accuracy of the path information and reduce the error of single sensor detection and data conversion, the three offset distances calculated according to the three effective sensors can be averaged to obtain more accurate path information.

It is worth noting that the path information thus obtained is the distance of the vehicle center offset path marking line, which is a continuously varying amount, which can detect the track when the sensor is directly above the track marking line, and can also be in the sensor bias. The specific offset distance is given when the marker line is moved, thus eliminating the "blind zone" of the sensor gap and achieving continuous path recognition.

Problems and prospects

Compared with the ordinary discrete algorithm, the continuous path deviation identification algorithm not only has the characteristics of accurate positioning and continuous response, but also theoretically, the continuous algorithm can ensure better path recognition effect in any number of sensor configuration control systems. The fluency of control provides the possibility.

At the same time, it should be pointed out that when using this algorithm, some related issues need to be paid attention to in hardware design:

It is necessary to select the appropriate photoelectric sensor according to the actual path marking line width and the height of the sensor from the ground.

In order to ensure the simplicity of the algorithm, so that all sensors can share a piecewise linear model, it is best to ensure the uniformity of all sensors, that is, the characteristics of all sensors have roughly the same shape. This is actually very difficult to achieve, but if you pay attention to the design, such as the hierarchical screening of components, you can still partially improve the problem and bring convenience to the algorithm.

Lithium Battery

S/N
Project
General Parameter
1
Number of series
15S
2
Rated voltage
48V
3
End of discharge voltage
40V
4
Charging voltage
Recommend 51V (50.5V – 51.5V) for floating charge
Recommend 54V (53.5V – 54.5V) for equation charge
5
Continuous charge and discharge curren
≤100A
6
Internal resistance (battery pack)
≤100mΩ
7
Self-discharge rate
≤2%/month
8
range of working temperature
(≤95%R.H.)
0~65℃ charge
-20~65℃ discharge
9
Storage temperature range(≤95%R.H.)
-40~70℃
10
Positive and negative lead way
Fence Terminal 2P*2
11
Display screen
LED display, four physical buttons
12
Protective function
Overcharge, over discharge, short circuit, overload, over temperature, etc.
13
certificate
MSDS,ISO9001,CE,UN38.3,ROSH

LIFEPO4 Battery For Home Energy Storage

Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.zhitainewenergy.com